#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：HiflyVideoAPI_Test 
@File    ：TestCaseV1AccountCredit.py
@Author  ：beibei
@Date    ：7/16/25 4:05 PM 
'''
import unittest

from business.voices.vo import BusinessRe
from common.assertCommon import AssertCommon
from common.yamlLoader import YamlRead
from common.caseOutput import info, class_case_decoration
from utils.utils_base import save_json_response


@class_case_decoration
class  TestCaseV1AccountCredit(unittest.TestCase):
    """
    测试用例：测试v1——账户余额查询接口
    """
    ac = AssertCommon()
    env_config = YamlRead().env_config1()
    host = env_config['host']
    br = BusinessRe()
    authorization = env_config['Authorization']

    def testCase01_v1_account_credit(self):
        """查询账户余额"""
        info('【step】查询账户余额')
        url = self.host + f'/api/v1/hifly/account/credit'
        res = self.br.get(url, self.authorization)
        info('【step】断言 code == 0')
        self.ac.code_assert(0, res.json()["code"])
        save_json_response(res.json(), "data/response/account/v1/account_credit_v1.json")
